package com.higgins.eventtracking.server.dataModel;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.higgins.eventtracking.client.dto.HealthAlertDTO;
import com.higgins.eventtracking.client.dto.HealthEventDTO;
import com.higgins.eventtracking.client.dto.SupportDTO;

@PersistenceCapable
public class Support {
	@SuppressWarnings("unused")
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
		
	@Persistent
	private String name;
	
	@Persistent
	private Integer level;
	
	@Persistent
	private String email;
	
	@Persistent
	private String phone;
	
	
	public Support()	{

	}
	public Support(SupportDTO dto)	{
		this.name = dto.getName();
		this.level = dto.getLevel();
		this.email = dto.getEmail();
		this.phone = dto.getPhone();
	}
	public Long getId()	{
		return id;
	}
	public void setName(String name)	{
		this.name = name;
	}
	public String getName()	{
		return name;
	}
	public void setLevel(Integer level)	{
		this.level = level;
	}
	public Integer getLevel()	{
		return level;
	}
	public void setEmail(String email)	{
		this.email = email;
	}
	public String getEmail()	{
		return email;
	}
	public void setPhone(String phone)	{
		this.phone = phone;
	}
	public String getPhone()	{
		return phone;
	}
	public SupportDTO toDTO()	{
		SupportDTO dto = new SupportDTO(id, name, level, email, phone);
		return dto;
	}
	public void update(SupportDTO dto)	{
		this.name = dto.getName();
		this.level = dto.getLevel();
		this.email = dto.getEmail();
		this.phone = dto.getPhone();
	}
}
